import {
    VALIDATE,
    TO_LOGIN,
    RECORDS_LIST,
    IMAGE_LIST,
    IMAGE_OPERATE,
    MESSAGE_LIST,
    CONFIGURE_LIST,
    MESSAGE_ADD,
    CONFIGURE_MODIFY,
    CONFIGURE_RUNTIME,
    COST_TOTAL,
    COST_COMPOSITION,
    COST_DETAILS

} from '@/config/url';
import request from '@/utils/request';

// 校验一个用户是否登录
export const validate = () => {
    return request(VALIDATE);
};
// 登录
export const login = (data) => {
    return request(TO_LOGIN, { method: 'post', data });
};
export const getRecords = (data) => {
    return request(RECORDS_LIST, { data });
};
export const getImageList = (data) => {
    return request(IMAGE_LIST, { data });
};
export const getImageOperate = (data) => {
    return request(IMAGE_OPERATE, { data });
};
// 获取消息
export const getMessage = (data) => {
    return request(MESSAGE_LIST, { data });
};
export const messageAdd = (data) => {
    return request(MESSAGE_ADD, { method: 'post', data });
};
export const configureList = () => {
    return request(CONFIGURE_LIST);
};
export const configureModify = (data) => {
    return request(CONFIGURE_MODIFY, { data });
};
export const configureRunTime = () => {
    return request(CONFIGURE_RUNTIME);
};
export const costTotal = (data) => {
    return request(COST_TOTAL, { data });
};
export const costComposition = () => {
    return request(COST_COMPOSITION);
};
export const costDetails = (data) => {
    return request(COST_DETAILS,{ data });
};